<template>
  <div v-if="popenevTVisible">
    <el-drawer v-if="popenevTVisible" :wrapper-closable="closeOnClickModal" :visible.sync="popenevTVisible" title="文件预览" size="80%">
      <ListPreview :fileInfo="fileInfo"/>
    </el-drawer>
  </div>

</template>

<script>
import ListPreview from '../ListPreview.vue';
export default {
  name: "popFilePreview",
  components: { ListPreview },
  data()
  {
    return {
      unid: 0,
      popenevTVisible: true,
      // 点击遮罩层是否关闭弹窗
      closeOnClickModal: false,
      //文件信息
      fileInfo: {},
    };
  },
  watch: {
    "$route.path": function (newVal, oldVal)
    {
      this.destroyElement();
    },
  },
  methods: {
    show(P_File)
    {
      this.fileInfo = P_File;
    },
        /**
     * cs 2022-4-8
     * 销毁组件
     */
     destroyElement()
    {
      this.popenevTVisible = false;
    },
  },
};
</script>

<style lang="scss" scoped>

</style>
